import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

const router = new Router({
  mode:'history',
  routes: [
    {
      path: '/login',
      component: resolve => require(['@/pages/login'], resolve),
      meta: { title: '登录'}
    },
    {
      path: '/',
      redirect: '/welcome'
    },
    {
      path: '/',
      component: resolve => require(['@/components/home'], resolve),
      meta: { title: '首页' },
      children:[
        {
          path:'/welcome',
          component:resolve=>require(['@/pages/welcome'],resolve),
          meta: { title: '首页'}
        },
        {
          path:'/myStuInfos',
          component:resolve=>require(['@/pages/myStuInfos'],resolve),
          meta: { title: '我的学员信息管理'}
        },
        {
          path:'/assignStudents',
          component:resolve=>require(['@/pages/assignStudents'],resolve),
          meta: { title: '分配学员'}
        },
        {
          path:'/baseInfo',
          component:resolve=>require(['@/pages/baseInfo'],resolve),
          meta: { title: '基本资料'}
        },
        {
          path:'/personalAccount',
          component:resolve=>require(['@/pages/personalAccount'],resolve),
          meta: { title: '账户信息'}
        },
        {
          path:'/personalAccount2',
          component:resolve=>require(['@/pages/personalAccount2'],resolve),
          meta: { title: '账户'}
        },
        {
          path:'/stuRebate',
          component:resolve=>require(['@/pages/stuRebate'],resolve),
          meta: { title: '学员返利'}
        },
        {
          path:'/experienceClass',
          component:resolve=>require(['@/pages/experienceClass'],resolve),
          meta: {  title: '体验班管理',}
        },
        {
          path:'/experienceTable',
          component:resolve=>require(['@/pages/experienceTable'],resolve),
          meta: { title: '体验班级课表'}
        },
        {
          path:'/formalClass',
          component:resolve=>require(['@/pages/formalClass'],resolve),
          meta: { title: '正式班级管理'}
        },
        {
          path:'/formalTable',
          component:resolve=>require(['@/pages/formalTable'],resolve),
          meta: { title: '正式课课表',}
        },
        {
          path:'/formalTable2',
          component:resolve=>require(['@/pages/formalTable2'],resolve),
          meta: { title: '课表',}
        },
        {
          path:'/backUserManage',
          component:resolve=>require(['@/pages/backUserManage'],resolve),
          meta: { title: '后台用户管理' }
        },
        {
          path:'/userGroupManage',
          component:resolve=>require(['@/pages/userGroupManage'],resolve),
          meta: { title: '用户组管理'}
        },
        {
          path:'/menuTree',
          component:resolve=>require(['@/pages/menuTree'],resolve),
          meta: { title: '菜单树管理'}
        },
        {
          path:'/termSet',
          component:resolve=>require(['@/pages/termSet'],resolve),
          meta: { title: '学期设置'}
        },
        {
          path:'/cashierWorkbench',
          component:resolve=>require(['@/pages/cashierWorkbench.vue'],resolve),
          meta: { title: '收银工作台'}
        },
        {
          path:'/packageConfig',
          component:resolve=>require(['@/pages/packageConfig.vue'],resolve),
          meta: { title: '产品套餐配置'}
        }               
      ]
    },
    {
      path:'/tags',
      component:resolve=>require(['@/components/tags'],resolve),
      meta: { title: '标签' }
    },
  ]
})
export default router